<template>
  <div class="app-container home">
    <h2 >我的待办</h2>
    <el-tabs v-model="activeName1" v-if="showCard1">
      <el-tab-pane name="first" label="销售订单待审核">
   
    <el-table :data="orderdata" v-loading="loading" >
        <el-table-column align="center" label="订单编号" prop="orderNo"></el-table-column>
        <el-table-column align="center" label="类型" prop="orderType"></el-table-column>
        <el-table-column align="center" label="合同号" prop="contractNo"></el-table-column>
        <el-table-column align="center" label="客户合同号" width="150" prop="customerContractNo"></el-table-column>
        <el-table-column align="center" label="订单日期" prop="orderDate"></el-table-column>
        <el-table-column align="center" label="客户名称" prop="customer"></el-table-column>
        <el-table-column align="center" label="销售员" prop="saleman"></el-table-column>
     
        <el-table-column label="审核状态" prop="status"></el-table-column>
        <el-table-column label="操作" width="100" fixed="right"  align="center" >
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleReview(scope.row)">反审核</el-button>
            <el-button type="text" size="mini" @click="handleReview(scope.row)">审核</el-button>
          </template>
        </el-table-column>
      </el-table>
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
      </el-tab-pane>

       <el-tab-pane name="second" label="采购订单待审核">

     
       <el-table :data="orderdata1" v-loading="loading">
  
      
        <el-table-column label="合同号" prop="requestCN"></el-table-column> 
        <el-table-column label="采购订单号" prop="RequestorderNo"></el-table-column>
         <el-table-column label="订单日期" prop="requestDate"></el-table-column>
         <el-table-column label="交货期" prop="deliveryDate"></el-table-column>
        <el-table-column label="供应商" prop="supplier"></el-table-column>
        <el-table-column label="采购业务员" prop="requestman"></el-table-column>
        <el-table-column label="运输方式" prop="requestType"></el-table-column>
        <el-table-column label="操作" align="center" width="150px" fixed="right">
          <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="handleReview1(scope.row)">反审核</el-button>
               <el-button type="text" size="mini" @click="handleReview1(scope.row)">审核</el-button>
          </template>
        </el-table-column>
      </el-table>
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
     
      </el-tab-pane>

       <el-tab-pane name="third" label="生产任务待审核">
    
    
       <el-table :data="taskDateList" v-loading="loading"  >
  
        <el-table-column align="center" label="生成任务单号" prop="taskNo"></el-table-column>
        <el-table-column align="center" label="任务日期" prop="taskDate"></el-table-column>
        <el-table-column align="center" label="任务计划开始日期" prop="planStartDate"></el-table-column>
        <el-table-column align="center" label="任务计划结束日期" prop="planEndDate"></el-table-column>
        <el-table-column align="center" label="合同号" prop="contractNo"></el-table-column>
        <el-table-column align="center" label="备注" prop="remark"></el-table-column>
        <el-table-column label="审核状态" prop="status"></el-table-column>
        <el-table-column label="操作" width="150" fixed="right" align="center">
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleReview2(scope.row)">反审核</el-button>
            <el-button type="text" size="mini" @click="handleReview2(scope.row)">审核</el-button>
          </template>
        </el-table-column>
      </el-table>
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
      </el-tab-pane>
    </el-tabs>
     
      <hr>
      
     
     
      
  <h2 >系统提醒</h2>
   <el-tabs v-model="activeName" v-if="showCard">
            <el-tab-pane label="产品下单提醒" name="first">
               
                <el-table :data="orderDownProduct" v-loading="loading">
                    <el-table-column prop="pro_name" label="产品名称"></el-table-column>
                    <el-table-column prop="pro_code" label="产品编号"></el-table-column>
                    <el-table-column prop="order_id" label="订单号"/>
                    <el-table-column prop="order_date" label="下单日期"></el-table-column>
                    <el-table-column prop="order_man" label="客户"></el-table-column>
                    <el-table-column label="操作" align="center" fixed="right">
                        <template slot-scope="scope">
                            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleReview4(scope.row)">查看</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
            </el-tab-pane>
            <el-tab-pane label="订单上线提醒" name="second">
            
                <el-table :data="orderDownOnline" v-loading="loading" >
                    <el-table-column prop="order_code" label="订单编号"></el-table-column>
                    <el-table-column prop="order_up_date" label="订单上线时间"></el-table-column>
                    <el-table-column prop="order_man" label="下单商家"/>
                    <el-table-column prop="comment" label="备注"></el-table-column>
                    <el-table-column prop="order_re" label="订单要求"></el-table-column>
                    <el-table-column label="操作" align="center" fixed="right">
                        <template slot-scope="scope">
                            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleRevie5(scope.row)">查看</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('second')"
                    :total="totalOnline"
                />
            </el-tab-pane>
            <el-tab-pane label="辅料入库提醒" name="third">
              
                <el-table :data="orderDownMaterial" v-loading="loading" >
                    <el-table-column prop="fu_kind" label="辅料类别"></el-table-column>
                    <el-table-column prop="in_date" label="辅料代码"></el-table-column>
                    <el-table-column prop="in_num" label="辅料名称"/>
                    <el-table-column label="操作" align="center" fixed="right">
                        <template slot-scope="scope">
                            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleReview6(scope.row)">查看</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('third')"
                    :total="totalMaterial"
                />
            </el-tab-pane>
        </el-tabs>
     
    
       
 
      <hr>
   

        <h2 >统计分析</h2>
        <h3 align="center">内销销售分析</h3>
        
        <el-table :data="orderdata2" v-loading="loading" 
        :row-style="rowStyle1"
       >
        <el-table-column align="center" label="订单编号" prop="orderNo"></el-table-column>
        <el-table-column align="center" label="类型" prop="orderType"></el-table-column>
        <el-table-column align="center" label="合同号" prop="contractNo"></el-table-column>
        <el-table-column align="center" label="客户合同号" width="150" prop="customerContractNo"></el-table-column>
        <el-table-column align="center" label="订单日期" prop="orderDate"></el-table-column>
        <el-table-column align="center" label="客户名称" prop="customer"></el-table-column>
        <el-table-column align="center" label="销售员" prop="saleman"></el-table-column>
      
        <el-table-column label="审核状态" prop="status"></el-table-column>
        <el-table-column label="操作" width="100" fixed="right"  align="center" >
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleReview7(scope.row)">反审核</el-button>
            <el-button type="text" size="mini" @click="handleReview7(scope.row)">审核</el-button>
          
          </template>
        </el-table-column>
      </el-table>
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
   <div class="status">
    
  <span class="urgent"></span>
  急需沟通
  
  <span class="advance"></span>
  提前联系
  
  <span class="normal"></span>
  正常
</div>



      <hr>
      <br>

      
      <h3 align="center">外销销售分析</h3>
    
            <el-table :data="orderdata4"    :row-style="rowStyle1" v-loading="loading">
        <el-table-column align="center" label="订单编号" prop="orderNo"></el-table-column>
        <el-table-column align="center" label="类型" prop="orderType"></el-table-column>
        <el-table-column align="center" label="合同号" prop="contractNo"></el-table-column>
        <el-table-column align="center" label="客户合同号" width="150" prop="customerContractNo"></el-table-column>
        <el-table-column align="center" label="订单日期" prop="orderDate"></el-table-column>
        <el-table-column align="center" label="客户名称" prop="customer"></el-table-column>
        <el-table-column align="center" label="销售员" prop="saleman"></el-table-column>
     
        <el-table-column label="审核状态" prop="status"></el-table-column>
        <el-table-column label="操作" width="100" fixed="right"  align="center" >
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleReview(scope.row)">反审核</el-button>
            <el-button type="text" size="mini" @click="handleReview(scope.row)">审核</el-button>
        
          </template>
        </el-table-column>
      </el-table> 
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />   
      <div class="status">
  <span class="urgent"></span>
  急需沟通
  <span class="advance"></span>
  提前联系
  <span class="normal"></span>
  正常
</div>

<el-row :gutter="20">
  <el-col :span="12">
    <div class="pie-chart" ref="chart1" style="width: 100%; height: 400px;"></div>
  </el-col>
  <el-col :span="12">
    <div class="pie-chart" ref="chart2" style="width: 100%; height: 400px;"></div>
  </el-col>
</el-row>


      <hr>
      <br>
<h3 align="center">采购分析</h3> 

   <el-table :data="orderdata3"    :row-style="rowStyle1" v-loading="loading" >
      
        <el-table-column label="订单日期" prop="requestDate"></el-table-column>
        <el-table-column label="供应商" prop="supplier"></el-table-column>
        <el-table-column label="采购业务员" prop="requestman"></el-table-column>
        <el-table-column label="运输方式" prop="requestType"></el-table-column>
        <el-table-column label="采购订单号" prop="RequestorderNo"></el-table-column> 
        <el-table-column label="操作" align="center" width="150px" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleReview8(scope.row)">查看订单</el-button>
        
          </template>
        </el-table-column>
      </el-table>
        <pagination
                    :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize"
                    @pagination="getList('first')"
                    :total="totalProduct"
                />
    <div class="status">
  <span class="urgent"></span>
  采购加急
  <span class="advance"></span>
  采购警告
  <span class="normal"></span>
  正常
</div>    

<el-row :gutter="20">
  <el-col :span="12">
    <div class="pie-chart" ref="chart3" style="width: 100%; height: 400px;"></div>
  </el-col>
  <el-col :span="12">
    <div class="pie-chart" ref="chart4" style="width: 100%; height: 400px;"></div>
  </el-col>
</el-row>

 

      <hr>
      <br>
<h3 align="center">仓库分析</h3>
  <el-table :data="detailedData"  :row-style="rowStyle1" v-loading="loading" >
                            <el-table-column type="selection" width="55" align="center" />
                           
                            <el-table-column align="center" label="物品描述">
                                <el-table-column align="center" label="代号" prop="code" />
                            
                                <el-table-column align="center" label="规格" prop="specification" />
                                <el-table-column align="center" label="单位" prop="company" />
                                <el-table-column align="center" label="图号" prop="DrawingNo" />
                            </el-table-column>
                            <el-table-column align="center" label="项目批号" prop="batch" />
                            <el-table-column align="center" label="存放货位" prop="storageLocation" />
                            <el-table-column align="center" label="产品属性" prop="attribute" />
                            <el-table-column align="center" label="颜色" prop="colour" />
                            <el-table-column align="center" label="数量" prop="number" />
                           
                            <el-table-column label="操作" align="center" width="150px" fixed="right">
                                <template slot-scope="scope">
                                    <el-button size="mini" type="text" icon="el-icon-edit"
                                        @click="handleReview9(scope.row)">查看</el-button>
                                
                                </template>
                            </el-table-column>
                        </el-table>

                        <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
                            @pagination="getList" />
                            <div class="status">
  <span class="urgent"></span>
  库存告急
  <span class="advance"></span>
  库存告警
  <span class="normal"></span>
  正常
</div>   

      <hr>
      <br>
<h3 align="center">生产分析</h3>  
 
       <el-table :data="taskDateList" :row-style="rowStyle1" v-loading="loading" >
        <el-table-column align="center" type="selection" width="55"></el-table-column>
        <el-table-column align="center" label="生成任务单号" prop="taskNo"></el-table-column>
        <el-table-column align="center" label="任务日期" prop="taskDate"></el-table-column>
        <el-table-column align="center" label="任务计划开始日期" prop="planStartDate"></el-table-column>
        <el-table-column align="center" label="任务计划结束日期" prop="planEndDate"></el-table-column>
        <el-table-column align="center" label="合同号" prop="contractNo"></el-table-column>
        <el-table-column align="center" label="备注" prop="remark"></el-table-column>
        <el-table-column label="审核状态" prop="status"></el-table-column>
        <el-table-column label="操作" width="150" fixed="right" align="center">
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleReview2(scope.row)">反审核</el-button>
            <el-button type="text" size="mini" @click="handleReview2(scope.row)">审核</el-button>
            
          </template>
        </el-table-column>
      </el-table>
        <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
                            @pagination="getList" />
        <div class="status">
  <span class="urgent"></span>
  生产告急
  <span class="advance"></span>
  生产告警
  <span class="normal"></span>
  正常
</div>   

  </div>
</template>

<script>
import * as echarts from 'echarts'; // 完整引入
export default {
  name: "Index",
  data() {
    return {
     
       chart: null,
     
      // 版本号
       ROOT_PATH: '', // 请根据实际情况设置 ROOT_PATH
      option: null,
      version: "3.8.8",
          detailedData: [{
                warehouse: '仓库1',
                code: 'AX-5302-0982',
                name: '物品1',
                specification: '规格1',
                company: '单位1',
                DrawingNo:'图号1',
                batch:'ACH-je187293-DB-73',
                storageLocation:'存放货位1',
                attribute:'产品属性A',
                colour:'棕色',
                number:'10000',
                monovalent:'7.21',
                amount:'72100',
            }, {
                warehouse: '仓库2',
                code: 'AX-5987-1987',
                name: '物品2',
                specification: '规格2',
                company: '单位2',
                DrawingNo: '图号2',
                batch: 'ACH-jh987293-CB-173',
                storageLocation: '存放货位2',
                attribute: '产品属性B',
                colour: '黑色',
                number: '100000',
                monovalent: '1.21',
                amount: '121000',
            }, {
                warehouse: '仓库2',
                code: 'AX-3114-9712',
                name: '物品3',
                specification: '规格2',
                company: '单位2',
                DrawingNo: '图号3',
                batch: 'ACH-hjk98879-DB-937',
                storageLocation: '存放货位3',
                attribute: '产品属性B',
                colour: '黑色',
                number: '10000',
                monovalent: '6.21',
                amount: '62100',
            }],

     orderdata: [{
        orderNo: 'NXDD1905150001',
        money: '100000',
        itemName: '果篮',
        contractNo: 'GX190503',
        customerContractNo: 'GX190503',
        orderDate: '2019-05-15',
        customer: '浙江运隆',
        saleman: '马颜颜',
        orderType: '内销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },{orderNo: 'WMDD1603010003',
        money: '200000',
        itemName: '长方提手托盘',
        contractNo: '16YB0301',
        customerContractNo: '16YB0301',
        orderDate: '2016-03-01',
        customer: '西班牙家乐',
        saleman: '陈庆',
        orderType: '外销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },
      
       {orderNo: 'NXDD1610030001',
        money: '150000',
        itemName: '椭圆形物盘',
        contractNo: 'ZX161001',
        customerContractNo: 'ZX161001',
        orderDate: '2016-10-03',
        customer: '石家庄市锦强',
        saleman: '周灵芝',
        orderType: '内销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },
     ],
         orderdata1: [{
        orderNo: 'DM123456',
        supplier: '兴隆纸箱厂',
        requestDept: '包装车间',
        RequestorderNo: 'CGDD1711200001',
        requestCN:'GX171002加单',
        requestDate: '2017-11-19',
        deliveryDate: '2017-11-20',
        requestType: '按单采购',
        requestman: '仓库统计',
        requestname: '外箱(WX)',
        contractNo: 'OD298765545',
      }, {
        orderNo: ':QGD2411190001',
        supplier: '黄岩北城塑化器材厂',
        requestDept: '密胺生产部',
        RequestorderNo: 'CGDD2303100001',
        requestCN:'230103',
        requestDate: '2023-03-10',
        deliveryDate: '2023-03-10',
        requestType: '批量采购',
        requestman: '仓库统计',
        requestname: '产品条码(CT)',
        contractNo: 'OD298769775',
         
        }, {
        orderNo: ':QGD2411190002',
           supplier: '兴隆纸箱厂',
        requestDept: '成品生产部',
        RequestorderNo: 'CGDD1912160006',
         requestCN:'191003',
          requestDate: '2019-12-16',
           deliveryDate: '2019-12-16',
          requestType: '批量采购',
        requestman: '仓库统计',
        requestname: '白纸(BZ)',
          contractNo: 'OD298785214',
         
        }],
          taskDateList:[
        {
          orderNo: '123456',
          itemName: '产品A',
          contractNo: '123456',
          customerContractNo: '123456',
          orderDate: '2021-01-01',
          customer: '客户A',
          saleman: '业务员A',
          orderType: '外销',

          storageStatus: '未入库',
          deliveryStatus: '未发货',
          outboundStatus: '未出库',
          accountingStatus: '未记账',
          stopStatus: '未停止',
          status: '审核通过',
          reviewStatus: '待评审',
          taskNo: "20210101001",
          taskDate: "2021-01-01",
          planStartDate: "2021-01-01",
          planEndDate: "2021-01-31",
          contractNo: "20210101001",
          remark: "备注",
        },
        {
          orderNo: '123457',
          itemName: '产品B',
          contractNo: '123457',
          customerContractNo: '123457',
          orderDate: '2021-01-02',
          customer: '客户B',
          saleman: '业务员B',
          orderType: '外销',
          storageStatus: '未入库',
          deliveryStatus: '未发货',
          outboundStatus: '未出库',
          accountingStatus: '未记账',
          stopStatus: '未停止',
          status: '待审核',
          reviewStatus: '待评审',
          taskNo: "20210101002",
          taskDate: "2021-01-01",
          planStartDate: "2021-01-01",
          planEndDate: "2021-01-31",
          contractNo: "20210101002",
          remark: "备注",
        },
        {
          orderNo: '123458',
          itemName: '产品C',
          contractNo: '123458',
          customerContractNo: '123458',
          orderDate: '2021-01-03',
          customer: '客户C',
          saleman: '业务员C',
          orderType: '外销',
          storageStatus: '未入库',
          deliveryStatus: '未发货',
          outboundStatus: '未出库',
          accountingStatus: '未记账',
          stopStatus: '未停止',
          status: '待审核',
          reviewStatus: '待评审',
          taskNo: "20210101003",
          taskDate: "2021-01-01",
          planStartDate: "2021-01-01",
          planEndDate: "2021-01-31",
          contractNo: "20210101003",
          remark: "备注",
        },
        
      ],
       orderdata3: [{
       orderNo: 'DM123456',
        supplier: '兴隆纸箱厂',
        requestDept: '包装车间',
        RequestorderNo: 'CGDD1711200001',
        requestCN:'GX171002加单',
        requestDate: '2017-11-19',
        deliveryDate: '2017-11-20',
        requestType: '按单采购',
        requestman: '仓库统计',
        requestname: '外箱(WX)',
        contractNo: 'OD298765545',
      }, {
       orderNo: ':QGD2411190001',
        supplier: '黄岩北城塑化器材厂',
        requestDept: '密胺生产部',
        RequestorderNo: 'CGDD2303100001',
        requestCN:'230103',
        requestDate: '2023-03-10',
        deliveryDate: '2023-03-10',
        requestType: '批量采购',
        requestman: '仓库统计',
        requestname: '产品条码(CT)',
        contractNo: 'OD298769775',
        }, {
         orderNo: ':QGD2411190002',
           supplier: '兴隆纸箱厂',
        requestDept: '成品生产部',
        RequestorderNo: 'CGDD1912160006',
         requestCN:'191003',
          requestDate: '2019-12-16',
           deliveryDate: '2019-12-16',
          requestType: '批量采购',
        requestman: '仓库统计',
        requestname: '白纸(BZ)',
          contractNo: 'OD298785214',
         
        }],
        pro_data1: [
                {
                    id: 1,
                    label: '全选',
                    children: [
                        { id: 2, label: '密胺餐盘' },
                        { id: 3, label: '密胺水杯' }
                    ]
                }
            ],
            order_data1: [
                {
                    id: 1,
                    label: '全选',
                    children: [
                        { id: 2, label: 'XN1' },
                        { id: 3, label: 'XN2' }
                    ]
                }
            ],
            fu_data1: [
                {
                    id: 1,
                    label: '全选',
                    children: [
                        { id: 2, label: '箱子' },
                        { id: 3, label: '盒子' }
                    ]
                }
            ],
            defaultProps: { children: 'children', label: 'label' },
            fu_data2: [
                {
                    id: 1,
                    label: '全选',
                    children: [
                        { id: 2, label: 'MQ1' },
                        { id: 3, label: 'MQ2' }
                    ]
                }
            ],
            fu_data3: [
                {
                    id: 1,
                    label: '全选',
                    children: [
                        { id: 2, label: '大箱子' },
                        { id: 3, label: '小碗' }
                    ]
                }
            ],
            open1: false,
            open2: false,
            open3: false,
            title1: '',
            title2: '',
            title3: '',
            activeName: 'first',
             activeName1:'first',
            showCard: true,
              showCard1: true,
            showSearch: true,
            queryParams: { pageNum: 1, pageSize: 10 },
            queryParams1: {
                productName: '',
                orderId: '',
                orderOnlineTime: '',
                materialType: '',
                inTime: ''
            },
            orderDownProduct: [
                {
                    pro_name: '密胺餐盘',
                    pro_code: 'MP001',
                    order_id: 'OD001',
                    order_date: '',
                    order_man: '美食餐厅'
                },
                {
                    pro_name: '密胺水杯',
                    pro_code: 'MP002',
                    order_id: 'OD002',
                    order_date: '',
                    order_man: '咖啡屋'
                }
            ],
            orderDownProduct1: [
                {
                    pro_name: '密胺餐盘',
                    pro_code: 'MP01',
                    order_id: 'OD1',
                    order_date: '',
                    order_man: '美食餐厅'
                },
                {
                    pro_name: '密胺水杯',
                    pro_code: 'M02',
                    order_id: 'O02',
                    order_date: '',
                    order_man: '咖啡屋'
                }
            ],
            orderDownOnline: [
                {
                    order_code: 'OL001',
                    order_up_date: '2024-03-03',
                    order_man: '中餐厅',
                    comment: '加急订单',
                    order_re: '尽快发货'
                },
                {
                    order_code: 'OL002',
                    order_up_date: '2024-04-04',
                    order_man: '西餐厅',
                    comment: '正常订单',
                    order_re: '按时发货'
                }
            ],
            orderDownOnline1: [
                {
                    order_code: 'OL001',
                    order_up_date: '2024-03-07',
                    order_man: '中餐厅',
                    comment: '加急订单',
                    order_re: '尽快发货'
                },
                {
                    order_code: 'OL002',
                    order_up_date: '2024-04-08',
                    order_man: '西餐厅',
                    comment: '正常订单',
                    order_re: '按时发货'
                }
            ],
            orderDownMaterial: [
                {
                    fu_kind: '大箱子',
                    in_date: '2024-05-05',
                    in_num: 1000
                },
                {
                    fu_kind: '小盒子',
                    in_date: '2024-06-06',
                    in_num: 500
                }
            ],
            orderDownMaterial1: [
                {
                    fu_kind: '大箱子',
                    in_date: '2024-06-05',
                    in_num: 100
                },
                {
                    fu_kind: '小盒子',
                    in_date: '2024-06-08',
                    in_num: 50
                }
            ],
            loading: false,
            totalProduct: 2,
            totalOnline: 2,
            totalMaterial: 2,
            form_main1: {
                productname: '',
                productCode: '',
                contractNumber: '',
                date: '',
                contactPhone: ''
            },
            form_main2: {
                orderCode: '',
                orderOnlineTime: '',
                orderMan: '',
                comment: '',
                orderRe: ''
            },
            form_main3: {
                fuKind: '',
                inDate: '',
                inNum: ''
            },
            isDeleting: false,
         orderdata2: [{
        orderNo: 'NXDD1905150001',
        money: '100000',
        itemName: '果篮',
        contractNo: 'GX190503',
        customerContractNo: 'GX190503',
        orderDate: '2019-05-15',
        customer: '浙江运隆',
        saleman: '马颜颜',
        orderType: '内销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },
      {orderNo: 'NXDD1610030001',
        money: '150000',
        itemName: '椭圆形物盘',
        contractNo: 'ZX161001',
        customerContractNo: 'ZX161001',
        orderDate: '2016-10-03',
        customer: '石家庄市锦强',
        saleman: '周灵芝',
        orderType: '内销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },],
        orderdata4: [{orderNo: 'WMDD1603010003',
        money: '200000',
        itemName: '长方提手托盘',
        contractNo: '16YB0301',
        customerContractNo: '16YB0301',
        orderDate: '2016-03-01',
        customer: '西班牙家乐',
        saleman: '陈庆',
        orderType: '外销',
        storageStatus: '未入库',
        deliveryStatus: '未发货',
        outboundStatus: '未出库',
        accountingStatus: '未记账',
        stopStatus: '未停止',
        status: '审核通过',
        reviewStatus: '待评审',
      },
      ],
      chart1:null,
      chart2:null,
      chart3:null,
      chart4:null,
      chart5:null,
      chart6:null,
      chart7:null,
      chart8:null,
        };
    
    
  },
  
 mounted() {
   
    this.initChart1();
    this.initChart2();
     this.initChart3();
    this.initChart4();
   
  },

 methods: {
  initChart1() {
    this.chart1 = echarts.init(this.$refs.chart1);
    const option = {
      title: {
        text: '内销、外销的订单量的饼状图分析',
        left: 'center'
      },
      tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b}: {c} ({d}%)'
      },
      series: [{
        name: '订单量',
        type: 'pie',
        radius: ['40%', '70%'],
        avoidLabelOverlap: false,
        itemStyle: {
          borderRadius: 10,
          borderColor: '#fff',
          borderWidth: 2
        },
        label: {
          show: true,
          formatter: '{b}: {c} ({d}%)'
        },
        emphasis: {
          label: {
            show: true,
            fontSize: '18',
            fontWeight: 'bold'
          }
        },
        data: [
          { value: 50, name: '内销订单' },
          { value: 80, name: '外销订单' }
        ]
      }]
    };
    this.chart1.setOption(option);
  },

  initChart2() {
    this.chart2 = echarts.init(this.$refs.chart2);
    const option = {
      title: {
        text: '一年内 内销、外销的折线趋势图分析',
        left: 'center'
      },
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'cross',
          label: {
            backgroundColor: '#6a7985'
          }
        }
      },
      legend: {
        data: ['内销订单', '外销订单'],
        bottom: 10
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '15%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月','九月','十月','十一月','十二月']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          name: '内销订单',
          data: [120, 200, 150, 80, 70, 110, 130,120,50,90,70,180],
          type: 'line',
          symbol: 'circle',  // 改为小圆点
          symbolSize: 8,     // 调整大小
          label: {
            show: true,      // 显示数据标签
            position: 'top'  // 标签位置
          },
          lineStyle: {
            color: '#5470C6',
            width: 3
          },
          itemStyle: {
            color: '#5470C6'
          },
          areaStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: 'rgba(84, 118, 198, 0.5)' },
              { offset: 1, color: 'rgba(84, 118, 198, 0.1)' }
            ])
          }
        },
        {
          name: '外销订单',
          data: [100, 120, 150, 100, 170, 100, 30,170,80,100,170,80],
          type: 'line',
          symbol: 'circle',  // 改为小圆点
          symbolSize: 8,     // 调整大小
          label: {
            show: true,      // 显示数据标签
            position: 'top'  // 标签位置
          },
          lineStyle: {
            color: '#91cc75',
            width: 3
          },
          itemStyle: {
            color: '#91cc75'
          },
          areaStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: 'rgba(145, 204, 117, 0.5)' },
              { offset: 1, color: 'rgba(145, 204, 117, 0.1)' }
            ])
          }
        }
      ]
    };
    this.chart2.setOption(option);
  },

  initChart3() {
    this.chart3 = echarts.init(this.$refs.chart3);
    const option = {
      title: {
        text: '供应商的采购量的饼状图分析',
        left: 'center'
      },
      tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b}: {c} ({d}%)'
      },
      series: [{
        name: '采购量',
        type: 'pie',
        radius: ['40%', '70%'],
        avoidLabelOverlap: false,
        itemStyle: {
          borderRadius: 10,
          borderColor: '#fff',
          borderWidth: 2
        },
        label: {
          show: true,
          formatter: '{b}: {c} ({d}%)'
        },
        emphasis: {
          label: {
            show: true,
            fontSize: '18',
            fontWeight: 'bold'
          }
        },
        data: [
          { value: 50, name: '张三' },
          { value: 80, name: '李四' },
          { value: 100, name: '王五' }
        ]
      }]
    };
    this.chart3.setOption(option);
  },

  initChart4() {
    this.chart4 = echarts.init(this.$refs.chart4);
    const option = {
      title: {
        text: '一年内原料采购的价格的折线趋势图分析',
        left: 'center'
      },
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'cross',
          label: {
            backgroundColor: '#6a7985'
          }
        }
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '15%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月','九月','十月','十一月','十二月']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          name: '采购价格',
          data: [120, 200, 150, 80, 70, 110, 130,120,50,90,70,180],
          type: 'line',
          symbol: 'circle',  // 改为小圆点
          symbolSize: 8,     // 调整大小
          label: {
            show: true,      // 显示数据标签
            position: 'top'  // 标签位置
          },
          lineStyle: {
            color: '#ee6666',
            width: 3
          },
          itemStyle: {
            color: '#ee6666'
          },
          areaStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: 'rgba(238, 102, 102, 0.5)' },
              { offset: 1, color: 'rgba(238, 102, 102, 0.1)' }
            ])
          }
        }
      ]
    };
    this.chart4.setOption(option);
  },

 
    handleReview(){
      this.$router.push({
        path:'/salemgr/exportSales'
      })
    },
    handleReview1(){
       this.$router.push({
        path:'/purchase/Ingredients'
      })
    },
    handleReview2(){
       this.$router.push({
        path:'/produce/productionTasks'
      })
    },
    handleReview4(){
       this.$router.push({
        path:'/remind/reminding'
      })
    },
      handleReview5(){
       this.$router.push({
        path:'/remind/reminding'
      })
    },
      handleReview6(){
       this.$router.push({
        path:'/remind/reminding'
      })
    },
    handleReview7(){
        this.$router.push({
        path:'/salemgr/internalSales'
      })
    },
     handleReview8(){
        this.$router.push({
        path:'/purchase/Ingredients'
      })
    },
     handleReview9(){
        this.$router.push({
        path:'/stockmgr/InitialRegistration'
      })
    },
  
   rowStyle1({ row, rowIndex }) {
    // 定义三种颜色（建议使用浅色系）
    const colors = [

      '#e13c22', // 红
      '#f3fb53', // 黄
      '#07f407'  // 绿
    ]
    
    return {
      backgroundColor: colors[rowIndex % 3], // 每3行循环一次
      color: '#333' // 保持文字颜色
    }
  }
  }
}
</script>

<style scoped lang="scss">

.pie-chart {
  width: 100%;
  height: 400px;
  
}
.status span {
  padding: 5px 10px;
  border-radius: 5px;
  margin-right: 5px;
}
.urgent {
  background-color: #e13c22;
 
}
.advance {
  background-color: #f3fb53;
 
}
.normal {
  background-color: #07f407;
 
}

.home {
  
  blockquote {
   
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    border:4px;
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
    color:#e13c22
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>

